<ui:composition template="/admin/templates/ui2.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:archer="http://java.sun.com/jsf/archer"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

	<ui:define name="content">
		<link rel="stylesheet" type="text/css" href="/include/css/jscover.css" />
		<script type="text/javascript">
			//<![CDATA[
			function upload() {
				var upload = $("#form\\:upload").val();
				alert(upload);
			}
			//]]>
		</script>

		<div class="entry">
			<p:toolbar styleClass="admin-nav-toolbar">
				<p:toolbarGroup>
					<h:outputLabel value="#{commonMsg.currentPositionLabel} 记录导入"></h:outputLabel>
				</p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:separator />
					<p:button outcome="/admin/jira/bugSummaryList" value="BUG列表"></p:button>
				</p:toolbarGroup>
			</p:toolbar>
			<p:spacer></p:spacer>
			<h:form id="form" enctype="multipart/form-data">
				<p:panel id="filters">
					<h:panelGrid columns="2" columnClasses="col1,col2" id="panel">
						<h:outputLabel value="导入文件："></h:outputLabel>
						<ui:fragment>
							<!-- <br/> -->
							<p:fileUpload value="#{bugSummaryHome.file}" mode="simple" onfocus="upload();"
								label="文件上传" sizeLimit="1000000" id="upload"
								allowTypes="/(\.|\/)(xls/xlsx)/">
							</p:fileUpload>
							
							<h:outputLabel value="*请上传Excel(2003以上版本)格式的文件，文件拓展名为.xlsx"
								style="color: red;"></h:outputLabel>
						</ui:fragment>
						<h:outputLabel value="操作："></h:outputLabel>

						<ui:fragment>
							<p:commandButton value="导入" ajax="false" id="import"
								action="#{bugSummaryHome.importExcel}" type="submit"
								oncomplete="document.getElementById('form:upload').disabled=true;"></p:commandButton>
						</ui:fragment>

					</h:panelGrid>
				</p:panel>
			</h:form>
		</div>
	</ui:define>
</ui:composition>

